﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace CPPEI.PM.Shell.Dialogs
{
    /// <summary>
    /// Interaction logic for UserManagementDlg.xaml
    /// </summary>
    public partial class UserManagementDlg : Window
    {
        public UserManagementDlg()
        {
            InitializeComponent();

            RefreshUserList();
        }

        private void _ctlBtnCreate_Click_1(object sender, RoutedEventArgs e)
        {
            CreateUserDlg dlg = new CreateUserDlg();
            if (dlg.ShowDialog() == true)
            {
                RefreshUserList();
            }
        }

        private void RefreshUserList()
        {
            PMServiceRef.ListResultOfUser userList = new PMServiceRef.PMWebServiceSoapClient().GetUserList();
            this._ctlDataGrid.ItemsSource = userList.Datas;
        }
    }
}
